
var Poker = require('../Poker/Poker');


var Pattern = {
    NONE: 0,        // 散牌
    PAIR: 1,       // 对子
    PAIR2: 2,       // 两对
    THREEKIND: 3,       // 三条
    STRAIGHT: 4,       // 顺子
    FLUSH: 5,       // 同花
    FULLHOUSE: 6,       // 葫芦
    BOOM: 7,       // 炸弹
    BIGBRO: 8,       // 同花顺
}

var CompScore = {};
CompScore[Poker.Point.A] = 13;
CompScore[Poker.Point.K] = 12;
CompScore[Poker.Point.Q] = 11;
CompScore[Poker.Point.J] = 10;
CompScore["10"] = 9;
CompScore["9"] = 8;
CompScore["8"] = 7;
CompScore["7"] = 6;
CompScore["6"] = 5;
CompScore["5"] = 4;
CompScore["4"] = 3;
CompScore["3"] = 2;
CompScore["2"] = 1;


var CompColor = {};
CompColor[Poker.Color.SPADE] = 4;
CompColor[Poker.Color.HEART] = 3;
CompColor[Poker.Color.CLUB] = 2;
CompColor[Poker.Color.DIAMOND] = 1;

var PatternScore = {};
PatternScore[Pattern.NONE] = 0;
PatternScore[Pattern.N1] = 1;
PatternScore[Pattern.N2] = 1;
PatternScore[Pattern.N3] = 1;
PatternScore[Pattern.N4] = 1;
PatternScore[Pattern.N5] = 1;
PatternScore[Pattern.N6] = 1;
PatternScore[Pattern.N7] = 2;
PatternScore[Pattern.N8] = 2;
PatternScore[Pattern.N9] = 2;
PatternScore[Pattern.NN] = 3;
PatternScore[Pattern.YIN] = 4;
PatternScore[Pattern.JIN] = 5;

exports.Pattern = Pattern;
exports.PatternScore = PatternScore;
exports.CompColor = CompColor;
exports.CompScore = CompScore;